//
//  UIButton+Mybutton.h
//  QuickCoin
//
//  Created by tjl on 16/11/22.
//  Copyright © 2016年 tjl. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIButton (Mybutton)


/**
 创建图片button

 @param frame 位置
 @param normal 正常状况下的图片
 @param selected 选中的图片
 @param target self
 @param action 方法
 @return 返回值
 */
+ (UIButton *)createButtonWithFrame:(CGRect)frame NormalImage:(UIImage *)normal selectedImage:(UIImage *)selected target:(id)target andSEL:(SEL)action;
/**
 创建圆角button

 @param frame 位置
 @param title 内容
 @param ishav 圆角
 @param traget self
 @param action 方法
 @return 返回值
 */
+ (UIButton *)createButtonWithFrame:(CGRect)frame andTitle:(NSString *)title andLayer:(float)ishav andtraget:(id)traget andAction:(SEL)action;

+ (UIButton *)createButtonWithFrame:(CGRect)frame andTitle:(NSString *)title andLayer:(float)ishav andtraget:(id)traget andAction:(SEL)action backColor:(id)backColor;

/**
 *  创建button
 *
 *  @return button
 */
+ (UIButton *)createButtonWithTitle:(NSString *)titile frame:(CGRect )frame target:(id)target andSEL:(SEL)action font:(float)font;
+ (UIButton *)createButtonWithTitle:(NSString *)titile frame:(CGRect )frame target:(id)target andSEL:(SEL)action font:(float)font board:(BOOL)board;
+ (UIButton *)createButtonWithTitle:(NSString *)titile frame:(CGRect )frame target:(id)target andSEL:(SEL)action font:(float)font textColor:(id)textColor;


/**
 创建边框和字色一样的button

 @param frame 位置信息
 @param target 目标
 @param action 方法
 @param color 颜色
 @return 返回值
 */
+ (UIButton *)createCirleButtonWithFrame:(CGRect )frame title:(NSString *)title target:(id)target SEL:(SEL )action andCircleColor:(id)color;


/**
 创建左边图片右边文字的按钮

 @param leftImage 左边的图片
 @param title 右部标题
 @param target 类
 @param action 方法
 @param frame 位置信息
 @return 返回值
 */
+ (UIButton *)createButtonWithLeftImage:(UIImage *)leftImage rightTitle:(NSString *)title target:(id)target SEL:(SEL )action andFrame:(CGRect )frame;
/**
 创建底部不动按钮

 @param target 类
 @param section 方法
 */
+ (UIView *)configBottomButtonWithTarget:(id)target Sel:(SEL)section title:(NSString *)title;
+ (UIView *)configBottomButtonWithTarget:(id)target Sel:(SEL)section title:(NSString *)title bgColor:(id)bgColor;

+ (UIButton *)createBottomButtonWithTitle:(NSString *)titile frame:(CGRect )frame target:(id)target andSEL:(SEL)action font:(float)font;

@end

@interface  UIImage (colorful)

//创建单色的图片
+ (UIImage *)imageWithColor:(UIColor *)color;

@end
